using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using SalesPages.DomainModel;

namespace SalesPages.EntityFrameworkRepository.Mapping
{
    public class DynamicCombineHistoryMap : EntityTypeConfiguration<DynamicCombineHistory>
    {
        public DynamicCombineHistoryMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.URL)
                .HasMaxLength(200);

            this.Property(t => t.InsertBy)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("DynamicCombineHistory");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.DynamicCombine_ids).HasColumnName("DynamicCombine_ids");
            this.Property(t => t.URL).HasColumnName("URL");
            this.Property(t => t.InsertDate).HasColumnName("InsertDate");
            this.Property(t => t.InsertBy).HasColumnName("InsertBy");
        }
    }
}
